package com.cloud.ceshi.mode.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import lombok.*;

/**
 * <p>
 * 
 * </p>
 *
 * @author zwb
 * @since 2025-07-07
 */
@Data
@NoArgsConstructor(access = AccessLevel.PUBLIC)
@AllArgsConstructor(access = AccessLevel.PUBLIC)
@EqualsAndHashCode(callSuper = false)
@TableName("p_order")
public class POrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("user_id")
    private Long userId;

    @TableField("product_id")
    private Long productId;

    @TableField("amount")
    private Integer amount;

    @TableField("total_price")
    private Double totalPrice;

    @TableField("status")
    private Integer status;

    @TableField("add_time")
    private Date addTime;

    @TableField("last_update_time")
    private Date lastUpdateTime;
    public POrder(Long userId, Long productId, int status, Integer amount) {
        this.userId = userId;
        this.productId = productId;
        this.status = status;
        this.amount = amount;
    }
}
